import 'package:boss/ui/page/commodity/categories/page/plusCommodityMode/page/plusPackage/provider/package_detail_provider.dart';
import 'package:boss/ui/widget/form/long_text_form_field.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'package_panel.dart';

class DescriptionPanel extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return PackagePanel(
      title: '套餐描述',
      contentPadding: EdgeInsets.only(
        bottom: 30.w,
      ),
      children: <Widget>[
        Consumer<PackageDetailProvider>(
          builder: (context, provider, _) {
            return LongTextFormField(
              hintText: '套餐介绍与特色',
              maxLength: 250,
              maxLines: 6,
              initValue: provider.package.description,
              onChanged: (value) {
                provider.setPackageDesc(value);
              },
            );
          },
        ),
      ],
    );
  }
}
